<include file="Public/header" />
<title>我的桌面</title>
</head>
<body>
<div style="padding:20px 0 20px 20px;float:left;width:98%;">
		<table class="table table-border table-bordered table-bg welcometable">
			<tbody>
			  <tr class="text-c">
				<td style="background: #3bb4f2;font-size: 16px;font-weight: bold;color:#fff!important;">
					<a href="<{:U('Download/import',array('id'=>'1.xls'))}>" style="color:#fff!important;">采购清单模板下载<i class="icon Hui-iconfont" style="font-size:18px;">&#xe640;</i></a>
				</td>
				<td>
					<form action="<{:U('Import/doimportListproduct')}>" method="post" id="postForm" enctype="multipart/form-data">
						<input type="file" class="btn btn-success" name="import"/>
						<input type="hidden" name="id" value="<{:I('id')}>"/>
						<input type="button" id="importP" class="btn btn-success" value="导入采购清单"/>
					</form>
				</td>
				
			  </tr>

			</tbody>
		</table>
</div>
    <include file="Public/footer_js" />
	 <script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script>
	$("#importP").click(function() { 
        $("#postForm").ajaxSubmit({  
            url:"<{:U('Import/doimportListproduct')}>",
            type : "post",  
            dataType : 'json',  
            success : function(data) {
				if(data.status==1){
					layer.msg(data.message,function(){
						parent.window.location.href =parent.window.location.href;
					});
				}else{
					layer.msg(data.message);
				}
                
            },  
            error : function(data) {  
                layer.msg('出错');
            }  
        });  
    });

</script>
</body>
</html>